import { rejects } from 'assert'
import fs from 'fs'
import { resolve } from 'path'

function getPromise(url) {
    return new Promise((resolve, reject) => {
        fs.readFile(url,'utf8',(err,data)=>{
            resolve(data)
        })
    })
}

getPromise('./txt/a.txt').then(res=>{
    console.log(res)
    return  getPromise('./txt/b.txt')
}).then(res=>{
    console.log(res)
    return  getPromise('./txt/c.txt')
}).then(res=>{
    console.log(res)
})